package com.ugrow.Study_System.activity;

import android.animation.ArgbEvaluator;
import android.animation.ObjectAnimator;
import android.media.Image;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.LinearInterpolator;
import android.widget.ImageView;

import com.ugrow.Study_System.R;

public class PropertyAnimActivity extends AppCompatActivity {

    private ImageView propertyIv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_propertyanim);
        propertyIv = (ImageView) findViewById(R.id.act_property_anim_iv);
//        propertyIv.animate().setStartDelay(50);

    }

    public void changeProperty(View view) {
//
//        propertyIv.animate().translationX(300)
////                .alpha(0.3f)
//                .setInterpolator(new AccelerateDecelerateInterpolator())
//                .setDuration(2000);
        ObjectAnimator animator = ObjectAnimator.ofFloat(propertyIv, "translationX", 300);
        animator.setDuration(2000);
        animator.start();

    }

    public void act_property_argb_Btn(View view) {
//        ObjectAnimator objectAnimator = ObjectAnimator.ofInt(view,"color",
////                0xffff0000,0xff00ff00);
////        objectAnimator.setEvaluator(new ArgbEvaluator());
////        objectAnimator.start();
    }
}
